{include "header.tpl"}

<link href="/css/bootstrap-switch.min.css" rel="stylesheet" media="screen">
<script src="/js/bootstrap-switch.min.js"></script>
<link rel="stylesheet" href="/css/skins/square/blue.css"/>
<script src="/js/icheck.min.js"></script>

<form id="domainForm" rel="" method="post" action="/adminmall/Goods/goodsModify" enctype="multipart/form-data" class="form-horizontal" role="form" onsubmit="domainSubmit()">

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">商品名称:</label>
        <div class="col-sm-5">
            <input type="text" id="title" name="title" value="{$data.title}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">详情图片:</label>
        <div class="col-sm-5">
            {if $data['img2'] neq ""}<img src="{Service_Attach::getInstance()->getThumbUrl($data['img2'],350,350)}">{/if}
            <input style="display: none" type="text" name="img2" value="{$data['img2']}"/>
            <input type="file" name="img2" value=""/>请上传300*200照片
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">首页推荐图片:</label>
        <div class="col-sm-5">
            {if $data['img3'] neq ""}<img src="{Service_Attach::getInstance()->getThumbUrl($data['img3'],640,280)}">{/if}
            <input style="display: none" type="text" name="img3" value="{$data['img3']}"/>
            <input type="file" name="img3" value=""/>请上传300*200照片
        </div>
    </div>

    {*<div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">进货价格:</label>
        <div class="col-sm-5">
            <input type="text" id="purchase_price" name="purchase_price" value="{$data.purchase_price}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">商品原价:</label>
        <div class="col-sm-5">
            <input type="text" id="price_old" name="price_old" value="{$data.price_old}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">商品现价:</label>
        <div class="col-sm-5">
            <input type="text" id="price_new" name="price_new" value="{$data.price_new}" class="form-control" required/>
        </div>
    </div>*}

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">邮费:</label>
        <div class="col-sm-5">
            <input type="text" id="freight" name="freight" value="{$data.freight}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">出售数量:</label>
        <div class="col-sm-5">
            <input type="text" id="cs_num" name="cs_num" value="{$data.cs_num}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">购买人数:</label>
        <div class="col-sm-5">
            <input type="text" id="paynum" name="paynum" value="{$data.paynum}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">是否首页推荐:</label>
        <div class="col-sm-5">
            <select name="is_banner">
                <option value="">--请选择是否首页推荐--</option>
                <option value="" {if $data.is_banner eq ""}selected{/if}></option>
                <option value="1" {if $data.is_banner eq 1}selected{/if}>是</option>
                <option value="2" {if $data.is_banner eq 2}selected{/if}>否</option>
            </select>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">商品版块分类:</label>
        <div class="col-sm-5">
            <select name="goodsection" class="form-control" title="分类">
                <option value="">--请选择分类--</option>
                {foreach $goodsectionList as $key => $value}
                    <option value="{$value['id']}" {if $data.goodsection eq $value['id']}selected="selected"{/if}>{$value['name']}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">商品总数:</label>
        <div class="col-sm-5">
            <input type="text" id="num" name="num" value="{$data.num}" class="form-control" required/>
        </div>
    </div>




    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">商品品牌:</label>
        <div class="col-sm-5">
            <input type="text" id="brand" name="brand" value="{$data.brand}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">商品左上角文字:</label>
        <div class="col-sm-5">
            <input type="text" id="lefttext" name="lefttext" value="{$data.lefttext}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">商品简述:</label>
        <div class="col-sm-5">
           <textarea id="resume" class="form-control" style="width:300px; height:200px;"
                     name="resume">{$data.resume}</textarea>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">商品详情:</label>
        <div class="col-sm-5">
            <textarea id="details" class="form-control" style="width:300px; height:200px;"
                      name="details">{$data.details}</textarea>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">商品产地:</label>
        <div class="col-sm-5">
            <input type="text" id="place_of_production" name="place_of_production" value="{$data.place_of_production}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">保质期限:</label>
        <div class="col-sm-5">
            <input type="text" id="quality_guarantee_period" name="quality_guarantee_period" value="{$data.quality_guarantee_period}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">成分:</label>
        <div class="col-sm-5">
            <input type="text" id="component" name="component" value="{$data.component}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">排序值:</label>
        <div class="col-sm-5">
            <input type="text" id="paixu" name="paixu" value="{$data.paixu}" class="form-control" required/>
        </div>
    </div>


    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">状态:</label>
        <div class="col-sm-5">
            <select name="status" class="form-control" title="分类">
                <option value="">--请选择商品状态--</option>
                {foreach $goodsStatus as $key => $value}
                    <option value="{$key}" {if $data.status eq $key}selected="selected"{/if}>{$value}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">&nbsp;</label>
        <div class="col-sm-3">
            <input type="hidden" name="id" value="{$smarty.get.id}"/>
            <button type="submit" class="btn btn-primary">提交</button>
        </div>
    </div>
</form>

<script type="text/javascript">


</script>
{include "footer.tpl"}